\(\int \frac {\cot ^5(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^4} \, dx\) [564]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 135 \[ \int \frac {\cot ^5(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^4} \, dx=-\frac {16 \csc (c+d x)}{a^4 d}+\frac {6 \csc ^2(c+d x)}{a^4 d}-\frac {8 \csc ^3(c+d x)}{3 a^4 d}+\frac {\csc ^4(c+d x)}{a^4 d}-\frac {\csc ^5(c+d x)}{5 a^4 d}-\frac {20 \log (\sin (c+d x))}{a^4 d}+\frac {20 \log (1+\sin (c+d x))}{a^4 d}-\frac {4}{d \left (a^4+a^4 \sin (c+d x)\right )} \]

[Out]

-16*csc(d*x+c)/a^4/d+6*csc(d*x+c)^2/a^4/d-8/3*csc(d*x+c)^3/a^4/d+csc(d*x+c)^4/a^4/d-1/5*csc(d*x+c)^5/a^4/d-20*
ln(sin(d*x+c))/a^4/d+20*ln(1+sin(d*x+c))/a^4/d-4/d/(a^4+a^4*sin(d*x+c))

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2915, 12, 90} \[ \int \frac {\cot ^5(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^4} \, dx=-\frac {4}{d \left (a^4 \sin (c+d x)+a^4\right )}-\frac {\csc ^5(c+d x)}{5 a^4 d}+\frac {\csc ^4(c+d x)}{a^4 d}-\frac {8 \csc ^3(c+d x)}{3 a^4 d}+\frac {6 \csc ^2(c+d x)}{a^4 d}-\frac {16 \csc (c+d x)}{a^4 d}-\frac {20 \log (\sin (c+d x))}{a^4 d}+\frac {20 \log (\sin (c+d x)+1)}{a^4 d} \]

[In]

Int[(Cot[c + d*x]^5*Csc[c + d*x])/(a + a*Sin[c + d*x])^4,x]

[Out]

(-16*Csc[c + d*x])/(a^4*d) + (6*Csc[c + d*x]^2)/(a^4*d) - (8*Csc[c + d*x]^3)/(3*a^4*d) + Csc[c + d*x]^4/(a^4*d
) - Csc[c + d*x]^5/(5*a^4*d) - (20*Log[Sin[c + d*x]])/(a^4*d) + (20*Log[1 + Sin[c + d*x]])/(a^4*d) - 4/(d*(a^4
 + a^4*Sin[c + d*x]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 2915

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {a^6 (a-x)^2}{x^6 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{a^5 d} \\ & = \frac {a \text {Subst}\left (\int \frac {(a-x)^2}{x^6 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d} \\ & = \frac {a \text {Subst}\left (\int \left (\frac {1}{x^6}-\frac {4}{a x^5}+\frac {8}{a^2 x^4}-\frac {12}{a^3 x^3}+\frac {16}{a^4 x^2}-\frac {20}{a^5 x}+\frac {4}{a^4 (a+x)^2}+\frac {20}{a^5 (a+x)}\right ) \, dx,x,a \sin (c+d x)\right )}{d} \\ & = -\frac {16 \csc (c+d x)}{a^4 d}+\frac {6 \csc ^2(c+d x)}{a^4 d}-\frac {8 \csc ^3(c+d x)}{3 a^4 d}+\frac {\csc ^4(c+d x)}{a^4 d}-\frac {\csc ^5(c+d x)}{5 a^4 d}-\frac {20 \log (\sin (c+d x))}{a^4 d}+\frac {20 \log (1+\sin (c+d x))}{a^4 d}-\frac {4}{d \left (a^4+a^4 \sin (c+d x)\right )} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.67 \[ \int \frac {\cot ^5(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^4} \, dx=-\frac {240 \csc (c+d x)-90 \csc ^2(c+d x)+40 \csc ^3(c+d x)-15 \csc ^4(c+d x)+3 \csc ^5(c+d x)+300 \log (\sin (c+d x))-300 \log (1+\sin (c+d x))+\frac {60}{1+\sin (c+d x)}}{15 a^4 d} \]

[In]

Integrate[(Cot[c + d*x]^5*Csc[c + d*x])/(a + a*Sin[c + d*x])^4,x]

[Out]

-1/15*(240*Csc[c + d*x] - 90*Csc[c + d*x]^2 + 40*Csc[c + d*x]^3 - 15*Csc[c + d*x]^4 + 3*Csc[c + d*x]^5 + 300*L
og[Sin[c + d*x]] - 300*Log[1 + Sin[c + d*x]] + 60/(1 + Sin[c + d*x]))/(a^4*d)

Maple [A] (verified)

Time = 0.43 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.58

method result size
derivativedivides \(\frac {-\frac {\left (\csc ^{5}\left (d x +c \right )\right )}{5}+\csc ^{4}\left (d x +c \right )-\frac {8 \left (\csc ^{3}\left (d x +c \right )\right )}{3}+6 \left (\csc ^{2}\left (d x +c \right )\right )-16 \csc \left (d x +c \right )+\frac {4}{\csc \left (d x +c \right )+1}+20 \ln \left (\csc \left (d x +c \right )+1\right )}{d \,a^{4}}\) \(78\)
default \(\frac {-\frac {\left (\csc ^{5}\left (d x +c \right )\right )}{5}+\csc ^{4}\left (d x +c \right )-\frac {8 \left (\csc ^{3}\left (d x +c \right )\right )}{3}+6 \left (\csc ^{2}\left (d x +c \right )\right )-16 \csc \left (d x +c \right )+\frac {4}{\csc \left (d x +c \right )+1}+20 \ln \left (\csc \left (d x +c \right )+1\right )}{d \,a^{4}}\) \(78\)
risch \(-\frac {8 i \left (75 i {\mathrm e}^{10 i \left (d x +c \right )}+75 \,{\mathrm e}^{11 i \left (d x +c \right )}-350 i {\mathrm e}^{8 i \left (d x +c \right )}-325 \,{\mathrm e}^{9 i \left (d x +c \right )}+574 i {\mathrm e}^{6 i \left (d x +c \right )}+552 \,{\mathrm e}^{7 i \left (d x +c \right )}-350 i {\mathrm e}^{4 i \left (d x +c \right )}-552 \,{\mathrm e}^{5 i \left (d x +c \right )}+75 i {\mathrm e}^{2 i \left (d x +c \right )}+325 \,{\mathrm e}^{3 i \left (d x +c \right )}-75 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{15 \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{2} d \,a^{4}}+\frac {40 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d \,a^{4}}-\frac {20 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d \,a^{4}}\) \(206\)
parallelrisch \(\frac {19200 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-9600 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+24 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 \left (\cot ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-118 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+24 \left (\cot ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+520 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-118 \left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2845 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+520 \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2845 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )+10860 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{480 d \,a^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}\) \(214\)

[In]

int(cos(d*x+c)^5*csc(d*x+c)^6/(a+a*sin(d*x+c))^4,x,method=_RETURNVERBOSE)

[Out]

1/d/a^4*(-1/5*csc(d*x+c)^5+csc(d*x+c)^4-8/3*csc(d*x+c)^3+6*csc(d*x+c)^2-16*csc(d*x+c)+4/(csc(d*x+c)+1)+20*ln(c
sc(d*x+c)+1))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 283 vs. \(2 (131) = 262\).

Time = 0.27 (sec) , antiderivative size = 283, normalized size of antiderivative = 2.10 \[ \int \frac {\cot ^5(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {150 \, \cos \left (d x + c\right )^{4} - 325 \, \cos \left (d x + c\right )^{2} - 300 \, {\left (\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1\right )} \sin \left (d x + c\right ) - 1\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) + 300 \, {\left (\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1\right )} \sin \left (d x + c\right ) - 1\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (150 \, \cos \left (d x + c\right )^{4} - 275 \, \cos \left (d x + c\right )^{2} + 119\right )} \sin \left (d x + c\right ) + 178}{15 \, {\left (a^{4} d \cos \left (d x + c\right )^{6} - 3 \, a^{4} d \cos \left (d x + c\right )^{4} + 3 \, a^{4} d \cos \left (d x + c\right )^{2} - a^{4} d - {\left (a^{4} d \cos \left (d x + c\right )^{4} - 2 \, a^{4} d \cos \left (d x + c\right )^{2} + a^{4} d\right )} \sin \left (d x + c\right )\right )}} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)^6/(a+a*sin(d*x+c))^4,x, algorithm="fricas")

[Out]

1/15*(150*cos(d*x + c)^4 - 325*cos(d*x + c)^2 - 300*(cos(d*x + c)^6 - 3*cos(d*x + c)^4 + 3*cos(d*x + c)^2 - (c
os(d*x + c)^4 - 2*cos(d*x + c)^2 + 1)*sin(d*x + c) - 1)*log(1/2*sin(d*x + c)) + 300*(cos(d*x + c)^6 - 3*cos(d*
x + c)^4 + 3*cos(d*x + c)^2 - (cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1)*sin(d*x + c) - 1)*log(sin(d*x + c) + 1)
+ 2*(150*cos(d*x + c)^4 - 275*cos(d*x + c)^2 + 119)*sin(d*x + c) + 178)/(a^4*d*cos(d*x + c)^6 - 3*a^4*d*cos(d*
x + c)^4 + 3*a^4*d*cos(d*x + c)^2 - a^4*d - (a^4*d*cos(d*x + c)^4 - 2*a^4*d*cos(d*x + c)^2 + a^4*d)*sin(d*x +
c))

Sympy [F(-1)]

Timed out. \[ \int \frac {\cot ^5(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^4} \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**5*csc(d*x+c)**6/(a+a*sin(d*x+c))**4,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.81 \[ \int \frac {\cot ^5(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^4} \, dx=-\frac {\frac {300 \, \sin \left (d x + c\right )^{5} + 150 \, \sin \left (d x + c\right )^{4} - 50 \, \sin \left (d x + c\right )^{3} + 25 \, \sin \left (d x + c\right )^{2} - 12 \, \sin \left (d x + c\right ) + 3}{a^{4} \sin \left (d x + c\right )^{6} + a^{4} \sin \left (d x + c\right )^{5}} - \frac {300 \, \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{4}} + \frac {300 \, \log \left (\sin \left (d x + c\right )\right )}{a^{4}}}{15 \, d} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)^6/(a+a*sin(d*x+c))^4,x, algorithm="maxima")

[Out]

-1/15*((300*sin(d*x + c)^5 + 150*sin(d*x + c)^4 - 50*sin(d*x + c)^3 + 25*sin(d*x + c)^2 - 12*sin(d*x + c) + 3)
/(a^4*sin(d*x + c)^6 + a^4*sin(d*x + c)^5) - 300*log(sin(d*x + c) + 1)/a^4 + 300*log(sin(d*x + c))/a^4)/d

Giac [A] (verification not implemented)

none

Time = 0.58 (sec) , antiderivative size = 248, normalized size of antiderivative = 1.84 \[ \int \frac {\cot ^5(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {\frac {19200 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{4}} - \frac {9600 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{4}} - \frac {1920 \, {\left (15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 28 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15\right )}}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{2}} + \frac {21920 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 4350 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 840 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 175 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 30 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3}{a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}} - \frac {3 \, a^{16} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 30 \, a^{16} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 175 \, a^{16} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 840 \, a^{16} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 4350 \, a^{16} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{20}}}{480 \, d} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)^6/(a+a*sin(d*x+c))^4,x, algorithm="giac")

[Out]

1/480*(19200*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^4 - 9600*log(abs(tan(1/2*d*x + 1/2*c)))/a^4 - 1920*(15*tan(1
/2*d*x + 1/2*c)^2 + 28*tan(1/2*d*x + 1/2*c) + 15)/(a^4*(tan(1/2*d*x + 1/2*c) + 1)^2) + (21920*tan(1/2*d*x + 1/
2*c)^5 - 4350*tan(1/2*d*x + 1/2*c)^4 + 840*tan(1/2*d*x + 1/2*c)^3 - 175*tan(1/2*d*x + 1/2*c)^2 + 30*tan(1/2*d*
x + 1/2*c) - 3)/(a^4*tan(1/2*d*x + 1/2*c)^5) - (3*a^16*tan(1/2*d*x + 1/2*c)^5 - 30*a^16*tan(1/2*d*x + 1/2*c)^4
 + 175*a^16*tan(1/2*d*x + 1/2*c)^3 - 840*a^16*tan(1/2*d*x + 1/2*c)^2 + 4350*a^16*tan(1/2*d*x + 1/2*c))/a^20)/d

Mupad [B] (verification not implemented)

Time = 11.28 (sec) , antiderivative size = 266, normalized size of antiderivative = 1.97 \[ \int \frac {\cot ^5(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{4\,a^4\,d}-\frac {35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{96\,a^4\,d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{16\,a^4\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,a^4\,d}-\frac {20\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^4\,d}-\frac {34\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+524\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\frac {569\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}-\frac {104\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\frac {118\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{15}-\frac {8\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{5}+\frac {1}{5}}{d\,\left (32\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+64\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+32\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\right )}+\frac {40\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}{a^4\,d}-\frac {145\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,a^4\,d} \]

[In]

int(cos(c + d*x)^5/(sin(c + d*x)^6*(a + a*sin(c + d*x))^4),x)

[Out]

(7*tan(c/2 + (d*x)/2)^2)/(4*a^4*d) - (35*tan(c/2 + (d*x)/2)^3)/(96*a^4*d) + tan(c/2 + (d*x)/2)^4/(16*a^4*d) -
tan(c/2 + (d*x)/2)^5/(160*a^4*d) - (20*log(tan(c/2 + (d*x)/2)))/(a^4*d) - ((118*tan(c/2 + (d*x)/2)^2)/15 - (8*
tan(c/2 + (d*x)/2))/5 - (104*tan(c/2 + (d*x)/2)^3)/3 + (569*tan(c/2 + (d*x)/2)^4)/3 + 524*tan(c/2 + (d*x)/2)^5
 + 34*tan(c/2 + (d*x)/2)^6 + 1/5)/(d*(32*a^4*tan(c/2 + (d*x)/2)^5 + 64*a^4*tan(c/2 + (d*x)/2)^6 + 32*a^4*tan(c
/2 + (d*x)/2)^7)) + (40*log(tan(c/2 + (d*x)/2) + 1))/(a^4*d) - (145*tan(c/2 + (d*x)/2))/(16*a^4*d)